package com.poizon.example;

import com.poizon.infrastructure.idem.core.util.impl.IdemUtil;
import org.apache.dubbo.config.spring.context.annotation.DubboComponentScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import java.util.concurrent.LinkedBlockingQueue;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicInteger;

@DubboComponentScan("com.poizon.example.controller")
@SpringBootApplication
public class Main {
    public static void main(String[] args) {
//        IdemUtil idemUtil = new IdemUtil(new ThreadPoolExecutor(1, 1, 0, TimeUnit.SECONDS, new LinkedBlockingQueue<>()));
//        idemUtil.executeIdem(
//                "test",
//                () -> {
//                    System.out.println("test");
//                    return null;
//                }, 10L, TimeUnit.MINUTES, "HTTP", new AtomicInteger(3)
//        );
        SpringApplication.run(Main.class, args);
    }
}
